package ${cfg.configPackge};

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
* <p>
* MybatisPlusConfig
* </p>
*
* @author javalaoniu
* @since 2022-03-20 00:34:21
* @description 由 Mybatisplus Code Generator 创建
**/
@Configuration("mybatisPlusConfig4${cfg.module}")
@EnableTransactionManagement
@ComponentScan(basePackages = {"${package.Controller}"})
@MapperScan("${package.Mapper}")
public class MybatisPlusConfig {

    /**
    * 分页插件
    */
    @Bean("paginationInterceptor4${cfg.module}")
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor page = new PaginationInterceptor();
        page.setDialectType(DbType.MYSQL.getDb());
        return page;
    }

}